<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站管理系统后台 - by iialab-Jackean</title>
<css href="../Public/css/style.css" />
<js href="__PUBLIC__/js/jquery-1.6.1.min.js" />
<script language="javascript">
$(function(){
	var nid = 0;
	var $ng = $("#topnavg > li > a");
	var $mg = $("#side-menu > .menu-group");
	$mg.hide();
	$ng.eq(0).addClass('current');
	$mg.eq(0).show();
	submenu(nid);
	
	$ng.click(function(){
		if($ng.index(this)==nid) return false;
		nid = $ng.index(this);
		$ng.not($ng.eq(nid)).removeClass("current");
		$mg.not($mg.eq(nid)).slideUp('100');
		$ng.eq(nid).addClass("current");
		$mg.eq(nid).slideDown('100');
		submenu(nid);
	});
	
	$mg.find('a').click(function(){
		var nowmenu = $mg.find("li[class='current']");
		if($(this).parent('li') != nowmenu)
		{
			nowmenu.removeClass("current");
			$(this).parent('li').addClass("current");
		}
	});
	
	
});

function submenu(nid)
{
	var $menugroup = $("#side-menu > .menu-group");
	var $menulisat = $menugroup.eq(nid).find('a');
	$menugroup.find('li').removeClass("current");
	$menugroup.eq(nid).find('li').eq(0).addClass("current");
	var url = $menugroup.find("li[class='current'] > a").attr('href');
	$("#mainframe").attr('src',url);	
}
<!-- 
if (self!=top){ 
top.location=self.location; 
} 
//--> 
</script>
</head>

<body>
<div id="header">
  <h1>网站你后台管理中心</h1>
  <ul id="topnavg">
    <volist name="TopNav" id="vo">
      <li><a href="#">{$vo}</a></li>
    </volist>
  </ul>
  <p> <span>欢迎回来：{$loginuser}</span> <span class="line">|</span> <a href="###" target="mainframe">更改密码</a> <span class="line">|</span> <a href="index.php" target="_blank" class="home">微博首页</a> <span class="line">|</span> <a href="{:U('Index/logout')}" target="_top">退出</a> </p>
</div>
<div id="mainDiv" class="main-frame">
  <iframe src="__URL__/main" id="mainframe" name="mainframe" width="100%" height="100%" frameborder="0" title="main frame content"></iframe>
</div>
<div id="side-menu">
  <volist name="menu" id="ngvo">
    <div class="menu-group">
      <volist name="ngvo['mod']" id="tmenu">
        <h2  class="first">{$tmenu.name}</h2>
        <ul>
          <volist name="ngvo['act'][$key]" id="smenu">
            <li><a href="__APP__/{$tmenu.ename}/{$key}"  target="mainframe">{$smenu}</a></li>
          </volist>
        </ul>
      </volist>
    </div>
  </volist>
</div>
<script type='text/javascript'>  
//初始化 自适应窗口大小
var autoSize = function(){
	var height = document.documentElement.clientHeight - 89;
	$('#side-menu').css('height',height+'px');
	$('#mainDiv').css('height',height+'px');
}
autoSize();
$(window).resize(autoSize);
</script>
</body>
</html>
